feat(entrykit): non-blocking fee estimation - #3784
Conversation
🦋 Changeset detectedLatest commit: a0f2d3c The changes in this PR will be included in the next version bump. This PR includes changesets to release 30 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
| if ([690, 17069, 695569].includes(client.chain.id)) { | ||
| // TODO: move to fee ref or similar approach | ||
| return () => getAction(client, estimateFeesPerGas, "estimateFeesPerGas")({ chain: client.chain }); | ||
| return cachedFeesPerGas(client); |
There was a problem hiding this comment.
viem prioritizes this method over the chain's estimateFeesPerGas config: https://github.com/wevm/viem/blob/3aa882692d2c4af3f5e9cc152099e07cde28e551/src/account-abstraction/actions/bundler/prepareUserOperation.ts#L447. If we override only the estimateFeesPerGas config, we still have one unnecessary call for getBlock: https://github.com/wevm/viem/blob/3aa882692d2c4af3f5e9cc152099e07cde28e551/src/actions/public/estimateFeesPerGas.ts#L132
There was a problem hiding this comment.
apparently viem no longer does this "3 gwei minimum" thing like it used to
which landed here and is now in mud: wevm/viem@9a7e864
so maybe we update the comment to say "we override this here to avoid an unnecessary getBlock call"?
258aef1 to
0f303f5
Compare
| refreshInterval?: number; | ||
| }; | ||
|
|
||
| export function withFeeCache(chain: Chain, options: WithFeeCacheOptions = { refreshInterval: 10_000 }): Chain { |
There was a problem hiding this comment.
| export function withFeeCache(chain: Chain, options: WithFeeCacheOptions = { refreshInterval: 10_000 }): Chain { | |
| export function withFeeCache<const chain extends Chain>(chain: chain, options: WithFeeCacheOptions = { refreshInterval: 10_000 }): chain { |
just to keep strong types
No description provided.